home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / sysdep.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-15  |  5.8 KB  |  178 lines

  1. /* System-dependent prototypes
  2.    Copyright (C) 1985, 1993, 1994 Free Software Foundation, Inc.
  3.  
  4. This file is part of XEmacs.
  5.  
  6. XEmacs is free software; you can redistribute it and/or modify it
  7. under the terms of the GNU General Public License as published by the
  8. Free Software Foundation; either version 2, or (at your option) any
  9. later version.
  10.  
  11. XEmacs is distributed in the hope that it will be useful, but WITHOUT
  12. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14. for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with XEmacs; see the file COPYING.  If not, write to the Free
  18. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* Synched up with: FSF 19.28.  Split out of sysdep.c/emacs.c. */
  21.  
  22. #ifndef _XEMACS_SYSDEP_H_
  23. #define _XEMACS_SYSDEP_H_
  24.  
  25. #include <setjmp.h>
  26.  
  27. #if !defined(VMS) || !defined(LINK_CRTL_SHARE) || !defined(SHAREABLE_LIB_BUG)
  28. extern char **environ;
  29. #else
  30. extern noshare char **environ;
  31. #endif /* VMS sharable environ bug */
  32.  
  33. struct emacs_tty;
  34. extern int emacs_get_tty (int fd, struct emacs_tty *settings);
  35. extern int emacs_set_tty (int fd, struct emacs_tty *settings, int waitp);
  36.  
  37. extern void stuff_char (struct device *d, int c);
  38.  
  39. extern void init_baud_rate (struct device *d);
  40.  
  41. extern void set_exclusive_use (int fd);
  42.  
  43. extern void set_descriptor_non_blocking (int fd);
  44.  
  45. extern void wait_without_blocking (void);
  46.  
  47. /* Wait for subprocess with process id `pid' to terminate and
  48.    make sure it will get eliminated (not remain forever as a zombie) */
  49. extern void wait_for_termination (int pid);
  50.  
  51. /* flush any pending output
  52.  * (may flush input as well; it does not matter the way we use it)
  53.  */
  54. extern void flush_pending_output (int channel);
  55.  
  56. extern void child_setup_tty (int out);
  57.  
  58. /* Suspend the Emacs process; give terminal to its superior.  */
  59. extern void sys_suspend (void);
  60.  
  61. extern void request_sigio (void);
  62. extern void unrequest_sigio (void);
  63.  
  64. extern void stop_interrupts (void);
  65. extern void start_interrupts (void);
  66. extern void slow_down_interrupts (void);
  67. extern void speed_up_interrupts (void);
  68.  
  69. /* Used so that signals can break out of system calls that aren't
  70.    naturally interruptible. */
  71.  
  72. jmp_buf break_system_call_jump;
  73. int can_break_system_calls;
  74.  
  75. extern int sys_write_1 (int fildes, CONST void *buf, unsigned int nbyte,
  76.             int allow_quit);
  77. extern int sys_read_1 (int fildes, void *buf, unsigned int nbyte,
  78.                int allow_quit);
  79.  
  80. /* Call these functions if you want to change some terminal parameter --
  81.    reset the device, change the parameter, and init it again. */
  82. extern void init_one_device (struct device *d);
  83. extern void reset_one_device (struct device *d);
  84.  
  85. /* Prepare all terminals for exiting Emacs; move the cursor to the
  86.    bottom of the frame, turn off special modes, etc.  Called at exit.
  87.    This calls reset_one_device() on all devices and does some other
  88.    stuff (e.g. fix the foreground pgroup). */
  89.  
  90. extern void reset_all_devices (void);
  91.  
  92. /* Call these functions if you are going to temporarily exit back to
  93.    the shell (e.g. when suspending).  This calls reset_one_device()
  94.    on the initial device and does some other stuff (e.g. fix the
  95.    foreground pgroup). */
  96.  
  97. extern void reset_initial_device (void);
  98. extern void reinit_initial_device (void);
  99.  
  100. /* We muck around with our process group.  This function needs
  101.    to be called at startup.  The rest of the mucking is done as
  102.    part of the functions reset_all_devices(), reset_initial_device(),
  103.    and reinit_initial_device(). */
  104.  
  105. extern void init_process_group (void);
  106. extern void munge_tty_process_group (void);
  107. extern void unmunge_tty_process_group (void);
  108.  
  109. extern void disconnect_controlling_terminal (void);
  110.  
  111. /* Return nonzero if safe to use tabs in output.
  112.    At the time this is called, init_sys_modes has not been done yet.  */
  113. extern int tabs_safe_p (struct device *d);
  114.  
  115. /* Get terminal size from system.
  116.    If zero or a negative number is stored, the value is not valid.  */
  117. extern void get_tty_device_size (struct device *d, int *widthp, int *heightp);
  118. /* Set the logical window size associated with descriptor FD */
  119. extern int set_window_size (int fd, int height, int width);
  120.  
  121. /* Set up the proper status flags for use of a pty.  */
  122. extern void setup_pty (int fd);
  123.  
  124. /* Return the address of the start of the text segment prior to unexec. */
  125. extern char *start_of_text (void);
  126. /* Return the address of the start of the data segment prior to unexec. */
  127. extern void *start_of_data (void);
  128. /* Return the address of the end of the text segment prior to unexec. */
  129. extern char *end_of_text (void);
  130. /* Return the address of the end of the data segment prior to unexec. */
  131. extern char *end_of_data (void);
  132.  
  133.  
  134. /* Get_system_name returns as its value a string for system-name to return. */
  135. extern void init_system_name (void);
  136.  
  137. #ifndef HAVE_GETWD
  138. extern char *getwd (char *pathname);
  139. #endif
  140.  
  141. #ifndef HAVE_RENAME
  142. extern int rename (CONST char *from, CONST char *to);
  143. #endif
  144.  
  145. #ifndef HAVE_DUP2
  146. extern int dup2 (int oldd, int newd);
  147. #endif
  148.  
  149. #ifdef VMS
  150. extern void init_vms_input (void);
  151. extern void stop_vms_input (void);
  152.  
  153. extern int vms_truncate (char *fn);
  154. extern int vlimit (void);       /* BTW, name conflicts with unix syscall */
  155. extern int define_logical_name (char *varname, char *string)
  156. extern int delete_logical_name (char *varname);
  157. extern int rename_sans_version (char *from, char *to);
  158. extern char *vmserrstr (int status);
  159. extern char *sys_translate_vms (char *vfile);
  160. extern char *sys_translate_unix (char *ufile);
  161. extern int creat_copy_attrs (char *old, char *new);
  162. extern int link (char *file, char *new);
  163. #endif /* VMS */
  164.  
  165. #ifndef HAVE_STRERROR
  166. /* X11R6 defines strerror as a macro */
  167. # ifdef strerror
  168. # undef strerror
  169. # endif
  170. extern CONST char *strerror (int);
  171. #endif
  172.  
  173. #ifndef HAVE_H_ERRNO
  174. extern int h_errno;
  175. #endif
  176.  
  177. #endif /* _XEMACS_SYSDEP_H_ */
  178.